package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.SysAdminUser;
import cn.huiyunche.base.service.vo.Result;
import cn.huiyunche.base.service.vo.SysAdminUserVo;
import cn.huiyunche.tools.basic.exceptions.BusinessException;

import java.util.List;

public interface AdminUserService {

    /**
     * 用户登录
     *
     * @param userName
     * @param password
     * @return
     * @throws BusinessException
     */
    SysAdminUser sign(String userName, String password);

    /**
     * 获取当前用户
     *
     * @return
     */
    SysAdminUser getThisUser();

    /**
     * 获取所有用户
     *
     * @return
     */
    Result<List<SysAdminUserVo>> all();

    /**
     * 添加用户
     *
     * @param sauv
     * @return
     */
    Result<String> save(SysAdminUserVo sauv);

    /**
     * 删除用户
     *
     * @param id
     * @return
     */
    Result<String> remove(Long id);

    /**
     * genju id查询
     *
     * @param id
     * @return
     */
    Result<SysAdminUserVo> byId(Long id);

}
